home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-13 / tmed150c.zip / TMED.DOC < prev    next >
Text File  |  1992-10-24  |  16KB  |  354 lines

  1.  
  2.  
  3.  
  4.   TMED is copyrighted 1992 by Liang Chen. No portion of this program may be
  5.   reproduced without the written permission of Liang Chen. It is a
  6.   shareware now. If you find it is useful and continue to use it, please
  7.   send $20 registration fee at following address
  8.  
  9.                         Liang Chen
  10.                         3227 Middlesex, Apt C
  11.                         Toledo, OH 43606
  12.                         USA
  13.  
  14.                         lchen2@uoft02.utoledo.edu
  15.  
  16.   Good suggestion for major enhancement from the user are welcomed. If it
  17.   is implemented in the future TMED version, you can have it for free.
  18.   There is no fee charged for upgrade.
  19.  
  20.   STANDARD DISCLAIMERS: THE COPYRIGHT HOLDER OFFERS NO WARRANTY WITH THIS
  21.   PROGRAM WHATSOEVER. NEITHER SHALL HE BE LIABLE FOR DAMAGES OF ANY KIND
  22.   THAT MAY ARISE FROM ITS USE.
  23.  
  24.  
  25.  
  26.  
  27.                                  INTRODUCTION
  28.  
  29.   TMED is a TSR memory editor which takes 8K memory when is loaded. It
  30.   can be used as an auxiliary debugging tool for programmers, or
  31.   sometime as a gamebuster. TMED can view what is in the memory and edit
  32.   the memory while other programs are running. TMED works great with
  33.   Turbo Debugger.
  34.  
  35.   TMED versions after 1.20 come with a key macro function. Since TMED is
  36.   resident in the memory, this key macro function may be used for any
  37.   other foreground running programs. But if the foreground programs also
  38.   hook to the INT08, INT09 handlers and use it heavily, the time delay
  39.   by the foreground program may cause problems for the macro function.
  40.   This is because a BIOS problem that some keys are overwritten before
  41.   it can be read.
  42.  
  43.  
  44.   WARNING:  TMED is not bug proof. The system may halt due to an
  45.             improper operation (such as editing or loading in critical
  46.             memory area, set wrong breakpoints, enter wrong data, etc.).
  47.             Not all people will benefit from this program. You have to
  48.             know something about programming in order to make full use
  49.             of it.
  50.  
  51.  
  52.                                   OPERATION
  53.  
  54.   LOADING:
  55.  
  56.             Enter 'TMED' at DOS prompt, then press <RETURN>.
  57.  
  58.  
  59.   INVOCATION:
  60.  
  61.             There are two ways to invoke the TMED, a) Hotkey: press left
  62.             <Ctrl> key twice; b) Breakpoint; it will pause and invoke
  63.             TMED when DOS runs to breakpoint (See how to set breakpoint
  64.             in the following instructions). If the invocation is
  65.             successful, TMED will display a memory page (256 bytes) in
  66.             hex and ascii codes and the command options.
  67.  
  68.             (Try to run TMED as a TSR now and activate it (press the
  69.             left <Ctrl> key twice) while you are reading this file. It
  70.             will help you understand the following commands.)
  71.  
  72.  
  73.   KEY MACRO FUNCTIONS:
  74.  
  75.             Macro function may be used any time when the TMED is in
  76.             resident. The macro buffer are big enough for 192 keys.
  77.  
  78.             Press Mky1 (default F11 key) once to record the key macro
  79.             (you will hear a short sound). Press F11 again will end
  80.             macro recording mode (you will hear a longer sound).
  81.  
  82.             Press Mky2 (default F12 key) will execute the key macro.
  83.             There is no time delay while executing the key macro.
  84.  
  85.             If you press Mky2 key while macro is in recording mode, then
  86.             it is a recursive macro. For example, you can let a
  87.             recursive macro continuously turns page for you. While
  88.             a recursive macro is executing, press any key will stop the
  89.             macro running.
  90.  
  91.             Mky1 and Mky2 may be assigned to other keys (see below), in
  92.             case these keys are used by the foreground running programs.
  93.  
  94.  
  95.   COMMANDS:
  96.             Commands are invoked by pressing the <Alt> key with the upper
  97.             case letter in the command option line.
  98.  
  99.  
  100.       TMED: <Alt>-T will display the TMED data segment. The cursor will
  101.             be placed at the first byte of the string input buffer. To
  102.             reduce the size of TMED, some data are entered by editing
  103.             the corresponding memory addresses in the data segment.
  104.             Useful information shown in this page and next page are:
  105.  
  106.                   Mode:XBodc:X        Editing mode and screen board
  107.                                           color.
  108.                                           May be changed by editor.
  109.  
  110.                   Txtc:XHilc:X        Text color and highlight
  111.                                           color. highlight color are
  112.                                           used to display bytes in
  113.                                           memory that are different from
  114.                                           the saved buffer or dumped
  115.                                           file. The saved memory buffer
  116.                                           is 256 bytes (a page). May be
  117.                                           changed by editor.
  118.  
  119.                   Swpg:XSwmd:X        Switch page and video mode
  120.                                           when TMED is invoked. TMED
  121.                                           will try to work in different
  122.                                           video page. If it does not
  123.                                           work normally, try different
  124.                                           Txtc, Hilc, Swpg. TMED does
  125.                                           not save the original screen.
  126.                                           After quit TMED, programs will
  127.                                           operate as before the popup.
  128.                                           But the graphic display and
  129.                                           colors may be changed. May be
  130.                                           changed by editor.
  131.  
  132.  
  133.                                           NOTE: AFTER CHANGING THE SWPG,
  134.                                           ALL DISPLAY WILL OUTPUT TO THE
  135.                                           NEW PAGE. YOU SHOULD QUIT
  136.                                           EDITOR MODE AND TMED, THEN
  137.                                           POPUP AGAIN.
  138.  
  139.                   Odpg:XOdmd:X        Old video mode and page before
  140.                                           popup. Please do not change it.
  141.  
  142.                   Endc:XWldc:X        The ending char and the wild
  143.                                           char in the search string. By
  144.                                           default, ending char is hex
  145.                                           00; wild char is hex FF. For
  146.                                           example, to find
  147.  
  148.                                                instruction        hex
  149.  
  150.                                                cmp     al,XX      3C XX
  151.                                                jne     XX         75 XX
  152.  
  153.                                           the search string may be
  154.                                           entered as (in hex)
  155.  
  156.                                                3C FF 75 00
  157.  
  158.                                           Endc and Wldc may be changed
  159.                                           by editor.
  160.  
  161.                   Ustc:XCsrc:X        Unset breakpoint byte and
  162.                                           cursor color. By default, Ustc
  163.                                           is hex 'CD' (hex code for
  164.                                           interrupt 'int'); May be
  165.                                           changed by editor.
  166.  
  167.  
  168.                   AX= XXBX= XX        The register values before popup
  169.                   CX= XXDX= XX        or breakpoint.
  170.                   SI= XXDI= XX
  171.  
  172.                   CS= XXIP= XX        CS:IP, next instruction address
  173.                                           after breakpoint pause.
  174.  
  175.                   Line of input:        16 bytes string buffer for 'Find'
  176.                   XXXXXXXXXXXXXXXX        command. Using editor
  177.                                           to change the string.
  178.  
  179.                                (next memory page)
  180.  
  181.                   Seg1XXSeg2XX        Search start and end segment
  182.                                           addresses. By default, Seg1 is
  183.                                           set to the top memory address of
  184.                                           TMED; Seg2 is set to A000, ie.,
  185.                                           the top of the conventional
  186.                                           memory.
  187.                                           May be changed by editor.
  188.  
  189.                   GadrXXPadrXX        Current and previous addresses.
  190.                   DadrXXJadrXX        Memory dump and relative jump
  191.                                           start addresses.
  192.                                           May be changed by editor.
  193.  
  194.                   Mky1XXMky2XX        Scan codes of Mky1 and Mky2.
  195.                                           May be changed to other keys by
  196.                                           the editor.
  197.  
  198.                   MadrXXKadrXX        Memory and KeyMacro buffer
  199.                                           addresses.
  200.  
  201.                   KnumXXSflgXX        Knum = Macro key number.
  202.                                           Sflg = sound flag.
  203.                                                = 0      sound off
  204.                                                = 1      sound on (default)
  205.                                           May be changed by editor.
  206.  
  207.                   SnhiXXSnlwXX        Beep sound high and low tones.
  208.                                           May be changed by editor.
  209.  
  210.                   DmpfXXXX.XXX           ASCIIZ dump file name.
  211.                                           May be changed by TMED editor.
  212.  
  213.       You may find other variables in the TMED data area. But these data
  214.       are not explained and marked. You are supposed not to change them.
  215.  
  216.       ALPHA/HEX MODE:  Change editing modes.
  217.  
  218.       EDIT:       Invoke the alpha/hex memory editor to edit current
  219.                   memory page (not ROM). <ESC> or <ENTER> to quit edit
  220.                   mode. Using direction keys to move cursor.
  221.  
  222.  
  223.       FIND/NEXT:  <Alt>-F will find the first string that you entered in
  224.                   the search string buffer between the memory addresses
  225.                   of Seg1 and Seg2. <Alt>-N will find the next string.
  226.  
  227.  
  228.       GOTO/JUMP/PREVIOUS: <Alt>-G will read a new segment address from
  229.                   the keyboard (in hex, no echo), then go to the new
  230.                   address; <Alt>-J will read a relative jump address
  231.                   from the keyboard (in hex, no echo), then jump to the
  232.                   new address. The actual address is affected by the
  233.                   base address saved in Jadrs; <Alt>-P will goto
  234.                   previous address.
  235.  
  236.       DUMP/COMPARE/MORE: <Alt>-D will dump 64k (256 pages) memory start
  237.                   from current page to the dump file; <Alt>-C will enter
  238.                   the comparing mode and compare the dump file with the
  239.                   current memory. The changed memory bytes are displayed
  240.                   in highlight color; <Alt>-M will move to next page
  241.                   that has changes; <Alt>-C again will quit comparing
  242.                   mode.
  243.  
  244.       CONVERT:    Convert decimal number ( < 65535 ) at the string
  245.                   buffer to hex code. Useful when try to find the stored
  246.                   game score addresses and cheat the game.
  247.  
  248.       KEYCODE:    <Alt>-K once, the string buffer will display the scan
  249.                   code of any key input that follows. <Alt>-k again will
  250.                   exit. Macro recording in this mode will just record
  251.                   the keystrokes.
  252.  
  253.       RESTORE:    Restore the byte at current cursor position from the
  254.                   memory buffer to the memory.
  255.  
  256.       SETBREAKPOINT/IP: <Alt>-S will set the break point at current
  257.                   cursor position; <Alt>-I will goto the breakpoint that
  258.                   invoked TMED. The breakpoint byte may also be changed
  259.                   by the editor. Tips for activating TMED when play
  260.                   games: if hotkey works, fine; if hotkey does not work,
  261.                   use a binary editor put 'CC' in the game executable
  262.                   file (be sure you keep a copy of it).
  263.  
  264.                   Please note that if the breakpoint you set is not the
  265.                   first byte of an executable instruction, unpredictable
  266.                   results will be seen as program execution passes
  267.                   through the breakpoint. A breakpoint in a ROM area
  268.                   will not operate since instructions in ROM cannot be
  269.                   replaced with a breakpoint instruction.
  270.  
  271.                   When Turbo Debugger is running, the breakpoints set by
  272.                   TMED will like the breakpoints set by Turbo Debugger.
  273.                   But You have to restore the original codes before
  274.                   executing following instructions.
  275.  
  276.       Update:     <Alt>-U will update the current memory page.
  277.  
  278.       LOAD:       <Alt>-R will restore the dumped memory region from the
  279.                   dumped file.
  280.  
  281.       Boot:       <Alt>-B will do a warm boot.
  282.  
  283.       Quit:       <Alt>-Q will quit TMED.
  284.  
  285.       (Operation):<Alt>-O will toggle between the foreground mode and
  286.                   background operation mode. There is no screen output
  287.                   in a background operation mode, but all other command
  288.                   options (include the macro function) are still
  289.                   available when TMED is invoked. This mode is useful
  290.                   when the foreground running programs is in graphic mode
  291.                   and you do not want destroy the screen.
  292.  
  293.  
  294.                                ACKNOWLEDGEMENT
  295.  
  296.       The original TSR shell I used for TMED was written by Thomas
  297.       Brandenborg (filename TSRDEMO2.ARC on simtel20 site). His copyright
  298.       and address are included below
  299.  
  300.             Copyright 1987 by Thomas Brandenborg. All Rights Reserved.
  301.  
  302.              Thomas Brandenborg
  303.              Lundbyesgade 11
  304.              DK-8000 Aarhus C
  305.              DENMARK
  306.  
  307.  
  308.                                  WHAT IS NEW?
  309.  
  310.                        Major revisions in version V1.5C
  311.                                   (10/23/92)
  312.  
  313.       1)    Now TMED can be operated in completed background mode. When the
  314.             foreground running program is in graphic mode the screen will
  315.             not be distroyed, since there is no screen output.
  316.  
  317.       2)    Some bugs in key macro function are fixed.
  318.  
  319.  
  320.                        Major revisions in version V1.4C
  321.                                   (10/16/92)
  322.  
  323.       1)    The screen output speed is simply three times faster than the
  324.             old version.
  325.  
  326.  
  327.                        Major revisions in version V1.3A
  328.                                   (10/12/92)
  329.  
  330.       1)    A major bug fixed in the key macro function.
  331.  
  332.  
  333.                        Major revisions in version V1.2H
  334.                                   (10/9/92)
  335.  
  336.       1)    Add key macro function to TMED.
  337.  
  338.       2)    Commands are now invoked by press <Alt> key and the upper
  339.             letters in the command option line. This avoids the confusion
  340.             of commands and data entry operation.
  341.  
  342.  
  343.                        Major revisions in version V1.10
  344.                                   (9/25/92)
  345.  
  346.       1)    Fix the bottom display shift-up problem when using the Compare
  347.             command without dumping the memory first (or tmed.dmp file not
  348.             found in current directory).
  349.  
  350.       2)    Allow cursor has different color from the highlight text color.
  351.  
  352.       3)    Some improvement in the display.
  353.  
  354.